<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDateTimeEdit Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDateTimeEdit Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QDateTimeEdit class provides a widget for editing dates and
times. <a href="#details">More...</a></p>

<p>Inherits <a href="qabstractspinbox.html">QAbstractSpinBox</a>.</p><p>Inherited by <a href="qdateedit.html">QDateEdit</a> and <a href="qtimeedit.html">QTimeEdit</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qdatetimeedit.html#Section-enum">Section</a></b> { NoSection, AmPmSection, MSecSection, SecondSection, ..., DateSections_Mask }</li><li><div class="fn" />class <b><a href="qdatetimeedit-sections.html">Sections</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdatetimeedit.html#QDateTimeEdit">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#QDateTimeEdit-2">__init__</a></b> (<i>self</i>, QDateTime&#160;<i>datetime</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#QDateTimeEdit-3">__init__</a></b> (<i>self</i>, QDate&#160;<i>date</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#QDateTimeEdit-4">__init__</a></b> (<i>self</i>, QTime&#160;<i>time</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qdatetimeedit.html#calendarPopup">calendarPopup</a></b> (<i>self</i>)</li><li><div class="fn" />QCalendarWidget <b><a href="qdatetimeedit.html#calendarWidget">calendarWidget</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#clearMaximumDate">clearMaximumDate</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#clearMaximumDateTime">clearMaximumDateTime</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#clearMaximumTime">clearMaximumTime</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#clearMinimumDate">clearMinimumDate</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#clearMinimumDateTime">clearMinimumDateTime</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#clearMinimumTime">clearMinimumTime</a></b> (<i>self</i>)</li><li><div class="fn" />Section <b><a href="qdatetimeedit.html#currentSection">currentSection</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qdatetimeedit.html#currentSectionIndex">currentSectionIndex</a></b> (<i>self</i>)</li><li><div class="fn" />QDate <b><a href="qdatetimeedit.html#date">date</a></b> (<i>self</i>)</li><li><div class="fn" />QDateTime <b><a href="qdatetimeedit.html#dateTime">dateTime</a></b> (<i>self</i>)</li><li><div class="fn" />QDateTime <b><a href="qdatetimeedit.html#dateTimeFromText">dateTimeFromText</a></b> (<i>self</i>, QString&#160;<i>text</i>)</li><li><div class="fn" />Sections <b><a href="qdatetimeedit.html#displayedSections">displayedSections</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qdatetimeedit.html#displayFormat">displayFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdatetimeedit.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>e</i>)</li><li><div class="fn" />QString&#160;<i>input</i> <b><a href="qdatetimeedit.html#fixup">fixup</a></b> (<i>self</i>, QString&#160;<i>input</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#fixup-2">fixup</a></b> (<i>self</i>, QString&#160;<i>input</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent&#160;<i>e</i>)</li><li><div class="fn" />bool <b><a href="qdatetimeedit.html#focusNextPrevChild">focusNextPrevChild</a></b> (<i>self</i>, bool&#160;<i>next</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#initStyleOption">initStyleOption</a></b> (<i>self</i>, QStyleOptionSpinBox&#160;<i>option</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>e</i>)</li><li><div class="fn" />QDate <b><a href="qdatetimeedit.html#maximumDate">maximumDate</a></b> (<i>self</i>)</li><li><div class="fn" />QDateTime <b><a href="qdatetimeedit.html#maximumDateTime">maximumDateTime</a></b> (<i>self</i>)</li><li><div class="fn" />QTime <b><a href="qdatetimeedit.html#maximumTime">maximumTime</a></b> (<i>self</i>)</li><li><div class="fn" />QDate <b><a href="qdatetimeedit.html#minimumDate">minimumDate</a></b> (<i>self</i>)</li><li><div class="fn" />QDateTime <b><a href="qdatetimeedit.html#minimumDateTime">minimumDateTime</a></b> (<i>self</i>)</li><li><div class="fn" />QTime <b><a href="qdatetimeedit.html#minimumTime">minimumTime</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent&#160;<i>event</i>)</li><li><div class="fn" />Section <b><a href="qdatetimeedit.html#sectionAt">sectionAt</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qdatetimeedit.html#sectionCount">sectionCount</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qdatetimeedit.html#sectionText">sectionText</a></b> (<i>self</i>, Section&#160;<i>s</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setCalendarPopup">setCalendarPopup</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setCalendarWidget">setCalendarWidget</a></b> (<i>self</i>, QCalendarWidget&#160;<i>calendarWidget</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setCurrentSection">setCurrentSection</a></b> (<i>self</i>, Section&#160;<i>section</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setCurrentSectionIndex">setCurrentSectionIndex</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setDate">setDate</a></b> (<i>self</i>, QDate&#160;<i>date</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setDateRange">setDateRange</a></b> (<i>self</i>, QDate&#160;<i>min</i>, QDate&#160;<i>max</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setDateTime">setDateTime</a></b> (<i>self</i>, QDateTime&#160;<i>dateTime</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setDateTimeRange">setDateTimeRange</a></b> (<i>self</i>, QDateTime&#160;<i>min</i>, QDateTime&#160;<i>max</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setDisplayFormat">setDisplayFormat</a></b> (<i>self</i>, QString&#160;<i>format</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setMaximumDate">setMaximumDate</a></b> (<i>self</i>, QDate&#160;<i>max</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setMaximumDateTime">setMaximumDateTime</a></b> (<i>self</i>, QDateTime&#160;<i>dt</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setMaximumTime">setMaximumTime</a></b> (<i>self</i>, QTime&#160;<i>max</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setMinimumDate">setMinimumDate</a></b> (<i>self</i>, QDate&#160;<i>min</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setMinimumDateTime">setMinimumDateTime</a></b> (<i>self</i>, QDateTime&#160;<i>dt</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setMinimumTime">setMinimumTime</a></b> (<i>self</i>, QTime&#160;<i>min</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setSelectedSection">setSelectedSection</a></b> (<i>self</i>, Section&#160;<i>section</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setTime">setTime</a></b> (<i>self</i>, QTime&#160;<i>time</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setTimeRange">setTimeRange</a></b> (<i>self</i>, QTime&#160;<i>min</i>, QTime&#160;<i>max</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#setTimeSpec">setTimeSpec</a></b> (<i>self</i>, Qt.TimeSpec&#160;<i>spec</i>)</li><li><div class="fn" />QSize <b><a href="qdatetimeedit.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#stepBy">stepBy</a></b> (<i>self</i>, int&#160;<i>steps</i>)</li><li><div class="fn" />QAbstractSpinBox.StepEnabled <b><a href="qdatetimeedit.html#stepEnabled">stepEnabled</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qdatetimeedit.html#textFromDateTime">textFromDateTime</a></b> (<i>self</i>, QDateTime&#160;<i>dt</i>)</li><li><div class="fn" />QTime <b><a href="qdatetimeedit.html#time">time</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.TimeSpec <b><a href="qdatetimeedit.html#timeSpec">timeSpec</a></b> (<i>self</i>)</li><li><div class="fn" />(QValidator.State, QString&#160;<i>input</i>, int&#160;<i>pos</i>) <b><a href="qdatetimeedit.html#validate">validate</a></b> (<i>self</i>, QString&#160;<i>input</i>, int&#160;<i>pos</i>)</li><li><div class="fn" />(QValidator.State, int&#160;<i>pos</i>) <b><a href="qdatetimeedit.html#validate-2">validate</a></b> (<i>self</i>, QString&#160;<i>input</i>, int&#160;<i>pos</i>)</li><li><div class="fn" /><b><a href="qdatetimeedit.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QWheelEvent&#160;<i>e</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qdatetimeedit.html#dateChanged">dateChanged</a></b> (const QDate&amp;)</li><li><div class="fn" />void <b><a href="qdatetimeedit.html#dateTimeChanged">dateTimeChanged</a></b> (const QDateTime&amp;)</li><li><div class="fn" />void <b><a href="qdatetimeedit.html#timeChanged">timeChanged</a></b> (const QTime&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDateTimeEdit class provides a widget for editing dates and
times.</p>
<p>QDateTimeEdit allows the user to edit dates by using the
keyboard or the arrow keys to increase and decrease date and time
values. The arrow keys can be used to move from section to section
within the QDateTimeEdit box. Dates and times appear in accordance
with the format set; see <a href="qdatetimeedit.html#displayFormat-prop">setDisplayFormat</a>().</p>
<pre class="cpp">
 <span class="type">QDateTimeEdit</span> <span class="operator">*</span>dateEdit <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QDateTimeEdit</span>(<span class="type"><a href="qdate.html">QDate</a></span><span class="operator">.</span>currentDate());
 dateEdit<span class="operator">-</span><span class="operator">&gt;</span><a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(<span class="type"><a href="qdate.html">QDate</a></span><span class="operator">.</span>currentDate()<span class="operator">.</span>addDays(<span class="operator">-</span><span class="number">365</span>));
 dateEdit<span class="operator">-</span><span class="operator">&gt;</span><a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(<span class="type"><a href="qdate.html">QDate</a></span><span class="operator">.</span>currentDate()<span class="operator">.</span>addDays(<span class="number">365</span>));
 dateEdit<span class="operator">-</span><span class="operator">&gt;</span><a href="qdatetimeedit.html#displayFormat-prop">setDisplayFormat</a>(<span class="string">"yyyy.MM.dd"</span>);
</pre>
<p>Here we've created a new QDateTimeEdit object initialized with
today's date, and restricted the valid date range to today plus or
minus 365 days. We've set the order to month, day, year.</p>
<p>The minimum value for QDateTimeEdit is 14 September 1752, and 2
January 4713BC for <a href="qdate.html">QDate</a>. You can change
this by calling <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(),
<a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(),
<a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(),
and <a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>().</p>
<a id="using-a-pop-up-calendar-widget" name="using-a-pop-up-calendar-widget" />
<h3>Using a Pop-up Calendar Widget</h3>
<p>QDateTimeEdit can be configured to allow a <a href="qcalendarwidget.html">QCalendarWidget</a> to be used to select
dates. This is enabled by setting the <a href="qdatetimeedit.html#calendarPopup-prop">calendarPopup</a> property.
Additionally, you can supply a custom calendar widget for use as
the calendar pop-up by calling the <a href="qdatetimeedit.html#setCalendarWidget">setCalendarWidget</a>()
function. The existing calendar widget can be retrieved with
<a href="qdatetimeedit.html#calendarWidget">calendarWidget</a>().</p>
<table class="generic" width="100%">
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Windows XP style date time editing widget" src="images/windowsxp-datetimeedit.png" /></td>
<td>A date time editing widget shown in the <a href="gallery-windowsxp.html">Windows XP widget style</a>.</td>
</tr>
<tr class="even" valign="top">
<td><img alt="Screenshot of a Macintosh style date time editing widget" src="images/macintosh-datetimeedit.png" /></td>
<td>A date time editing widget shown in the <a href="gallery-macintosh.html">Macintosh widget style</a>.</td>
</tr>
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Plastique style date time editing widget" src="images/plastique-datetimeedit.png" /></td>
<td>A date time editing widget shown in the <a href="gallery-plastique.html">Plastique widget style</a>.</td>
</tr>
</table>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Section-enum" />QDateTimeEdit.Section</h3><table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.NoSection</tt></td>
<td class="topAlign"><tt>0x0000</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.AmPmSection</tt></td>
<td class="topAlign"><tt>0x0001</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.MSecSection</tt></td>
<td class="topAlign"><tt>0x0002</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.SecondSection</tt></td>
<td class="topAlign"><tt>0x0004</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.MinuteSection</tt></td>
<td class="topAlign"><tt>0x0008</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.HourSection</tt></td>
<td class="topAlign"><tt>0x0010</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.DaySection</tt></td>
<td class="topAlign"><tt>0x0100</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.MonthSection</tt></td>
<td class="topAlign"><tt>0x0200</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QDateTimeEdit.YearSection</tt></td>
<td class="topAlign"><tt>0x0400</tt></td>
</tr>
</table>
<p>The Sections type is a typedef for <a href="qflags.html">QFlags</a>&lt;Section&gt;. It stores an OR
combination of Section values.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDateTimeEdit" />QDateTimeEdit.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an empty date time editor with a <i>parent</i>.</p>


<h3 class="fn"><a name="QDateTimeEdit-2" />QDateTimeEdit.__init__ (<i>self</i>, <a href="qdatetime.html">QDateTime</a>&#160;<i>datetime</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an empty date time editor with a <i>parent</i>. The
value is set to <i>datetime</i>.</p>


<h3 class="fn"><a name="QDateTimeEdit-3" />QDateTimeEdit.__init__ (<i>self</i>, <a href="qdate.html">QDate</a>&#160;<i>date</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an empty date time editor with a <i>parent</i>. The
value is set to <i>date</i>.</p>


<h3 class="fn"><a name="QDateTimeEdit-4" />QDateTimeEdit.__init__ (<i>self</i>, <a href="qtime.html">QTime</a>&#160;<i>time</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an empty date time editor with a <i>parent</i>. The
value is set to <i>time</i>.</p>


<h3 class="fn"><a name="calendarPopup" />bool QDateTimeEdit.calendarPopup (<i>self</i>)</h3><h3 class="fn"><a name="calendarWidget" /><a href="qcalendarwidget.html">QCalendarWidget</a> QDateTimeEdit.calendarWidget (<i>self</i>)</h3><p>Returns the calendar widget for the editor if <a href="qdatetimeedit.html#calendarPopup-prop">calendarPopup</a> is set to
true and (<a href="qml-presenting-data.html#sections">sections</a>() &amp; <a href="qdatetimeedit.html#Section-enum">DateSections_Mask</a>) != 0.</p>
<p>This function creates and returns a calendar widget if none has
been set.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#setCalendarWidget">setCalendarWidget</a>().</p>


<h3 class="fn"><a name="clear" />QDateTimeEdit.clear (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractspinbox.html#clear">QAbstractSpinBox.clear</a>().</p>


<h3 class="fn"><a name="clearMaximumDate" />QDateTimeEdit.clearMaximumDate (<i>self</i>)</h3><h3 class="fn"><a name="clearMaximumDateTime" />QDateTimeEdit.clearMaximumDateTime (<i>self</i>)</h3><h3 class="fn"><a name="clearMaximumTime" />QDateTimeEdit.clearMaximumTime (<i>self</i>)</h3><h3 class="fn"><a name="clearMinimumDate" />QDateTimeEdit.clearMinimumDate (<i>self</i>)</h3><h3 class="fn"><a name="clearMinimumDateTime" />QDateTimeEdit.clearMinimumDateTime (<i>self</i>)</h3><h3 class="fn"><a name="clearMinimumTime" />QDateTimeEdit.clearMinimumTime (<i>self</i>)</h3><h3 class="fn"><a name="currentSection" /><a href="qdatetimeedit.html#Section-enum">Section</a> QDateTimeEdit.currentSection (<i>self</i>)</h3><h3 class="fn"><a name="currentSectionIndex" />int QDateTimeEdit.currentSectionIndex (<i>self</i>)</h3><h3 class="fn"><a name="date" /><a href="qdate.html">QDate</a> QDateTimeEdit.date (<i>self</i>)</h3><h3 class="fn"><a name="dateTime" /><a href="qdatetime.html">QDateTime</a> QDateTimeEdit.dateTime (<i>self</i>)</h3><h3 class="fn"><a name="dateTimeFromText" /><a href="qdatetime.html">QDateTime</a> QDateTimeEdit.dateTimeFromText (<i>self</i>, QString&#160;<i>text</i>)</h3><p>Returns an appropriate datetime for the given <i>text</i>.</p>
<p>This virtual function is used by the datetime edit whenever it
needs to interpret text entered by the user as a value.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#textFromDateTime">textFromDateTime</a>() and
<a href="qdatetimeedit.html#validate">validate</a>().</p>


<h3 class="fn"><a name="displayedSections" /><a href="qdatetimeedit-sections.html">Sections</a> QDateTimeEdit.displayedSections (<i>self</i>)</h3><h3 class="fn"><a name="displayFormat" />QString QDateTimeEdit.displayFormat (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QDateTimeEdit.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="fixup" />QString&#160;<i>input</i> QDateTimeEdit.fixup (<i>self</i>, QString&#160;<i>input</i>)</h3><p>Reimplemented from <a href="qabstractspinbox.html#fixup">QAbstractSpinBox.fixup</a>().</p>


<h3 class="fn"><a name="fixup-2" />QDateTimeEdit.fixup (<i>self</i>, QString&#160;<i>input</i>)</h3><h3 class="fn"><a name="focusInEvent" />QDateTimeEdit.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget.focusInEvent</a>().</p>


<h3 class="fn"><a name="focusNextPrevChild" />bool QDateTimeEdit.focusNextPrevChild (<i>self</i>, bool&#160;<i>next</i>)</h3><p>Reimplemented from <a href="qwidget.html#focusNextPrevChild">QWidget.focusNextPrevChild</a>().</p>


<h3 class="fn"><a name="initStyleOption" />QDateTimeEdit.initStyleOption (<i>self</i>, <a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a>&#160;<i>option</i>)</h3><p>Initialize <i>option</i> with the values from this
QDataTimeEdit. This method is useful for subclasses when they need
a <a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a>, but
don't want to fill in all the information themselves.</p>
<p><b>See also</b> <a href="qstyleoption.html#initFrom">QStyleOption.initFrom</a>().</p>


<h3 class="fn"><a name="keyPressEvent" />QDateTimeEdit.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget.keyPressEvent</a>().</p>


<h3 class="fn"><a name="maximumDate" /><a href="qdate.html">QDate</a> QDateTimeEdit.maximumDate (<i>self</i>)</h3><h3 class="fn"><a name="maximumDateTime" /><a href="qdatetime.html">QDateTime</a> QDateTimeEdit.maximumDateTime (<i>self</i>)</h3><h3 class="fn"><a name="maximumTime" /><a href="qtime.html">QTime</a> QDateTimeEdit.maximumTime (<i>self</i>)</h3><h3 class="fn"><a name="minimumDate" /><a href="qdate.html">QDate</a> QDateTimeEdit.minimumDate (<i>self</i>)</h3><h3 class="fn"><a name="minimumDateTime" /><a href="qdatetime.html">QDateTime</a> QDateTimeEdit.minimumDateTime (<i>self</i>)</h3><h3 class="fn"><a name="minimumTime" /><a href="qtime.html">QTime</a> QDateTimeEdit.minimumTime (<i>self</i>)</h3><h3 class="fn"><a name="mousePressEvent" />QDateTimeEdit.mousePressEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget.mousePressEvent</a>().</p>


<h3 class="fn"><a name="paintEvent" />QDateTimeEdit.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget.paintEvent</a>().</p>


<h3 class="fn"><a name="sectionAt" /><a href="qdatetimeedit.html#Section-enum">Section</a> QDateTimeEdit.sectionAt (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the Section at <i>index</i>.</p>
<p>If the format is 'yyyy/MM/dd', sectionAt(0) returns <a href="qdatetimeedit.html#Section-enum">YearSection</a>, sectionAt(1)
returns <a href="qdatetimeedit.html#Section-enum">MonthSection</a>,
and sectionAt(2) returns <a href="qdatetimeedit.html#Section-enum">YearSection</a>,</p>
<p>This function was introduced in Qt 4.3.</p>


<h3 class="fn"><a name="sectionCount" />int QDateTimeEdit.sectionCount (<i>self</i>)</h3><h3 class="fn"><a name="sectionText" />QString QDateTimeEdit.sectionText (<i>self</i>, <a href="qdatetimeedit.html#Section-enum">Section</a>&#160;<i>s</i>)</h3><p>Returns the text from the given <i>section</i>.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#currentSection-prop">currentSection</a>().</p>


<h3 class="fn"><a name="setCalendarPopup" />QDateTimeEdit.setCalendarPopup (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setCalendarWidget" />QDateTimeEdit.setCalendarWidget (<i>self</i>, <a href="qcalendarwidget.html">QCalendarWidget</a>&#160;<i>calendarWidget</i>)</h3><p>The <i>calendarWidget</i> argument has it's ownership transferred to Qt.</p><p>Sets the given <i>calendarWidget</i> as the widget to be used
for the calendar pop-up. The editor does not automatically take
ownership of the calendar widget.</p>
<p><b>Note:</b> <a href="qdatetimeedit.html#calendarPopup-prop">calendarPopup</a> must be
set to true before setting the calendar widget.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#calendarWidget">calendarWidget</a>() and
<a href="qdatetimeedit.html#calendarPopup-prop">calendarPopup</a>.</p>


<h3 class="fn"><a name="setCurrentSection" />QDateTimeEdit.setCurrentSection (<i>self</i>, <a href="qdatetimeedit.html#Section-enum">Section</a>&#160;<i>section</i>)</h3><h3 class="fn"><a name="setCurrentSectionIndex" />QDateTimeEdit.setCurrentSectionIndex (<i>self</i>, int&#160;<i>index</i>)</h3><h3 class="fn"><a name="setDate" />QDateTimeEdit.setDate (<i>self</i>, <a href="qdate.html">QDate</a>&#160;<i>date</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setDate(const QDate&amp;)</tt>.</p><h3 class="fn"><a name="setDateRange" />QDateTimeEdit.setDateRange (<i>self</i>, <a href="qdate.html">QDate</a>&#160;<i>min</i>, <a href="qdate.html">QDate</a>&#160;<i>max</i>)</h3><p>Convenience function to set minimum and maximum date with one
function call.</p>
<pre class="cpp">
 setDateRange(min<span class="operator">,</span> max);
</pre>
<p>is analogous to:</p>
<pre class="cpp">
 <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(min);
 <a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(max);
</pre>
<p>If either <i>min</i> or <i>max</i> are not valid, this function
does nothing.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(),
<a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>(),
<a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(),
<a href="qdatetimeedit.html#minimumDate-prop">clearMinimumDate</a>(),
<a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(),
<a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>(),
<a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>(),
<a href="qdatetimeedit.html#minimumTime-prop">clearMinimumTime</a>(), and
<a href="qdate.html#isValid">QDate.isValid</a>().</p>


<h3 class="fn"><a name="setDateTime" />QDateTimeEdit.setDateTime (<i>self</i>, <a href="qdatetime.html">QDateTime</a>&#160;<i>dateTime</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setDateTime(const QDateTime&amp;)</tt>.</p><h3 class="fn"><a name="setDateTimeRange" />QDateTimeEdit.setDateTimeRange (<i>self</i>, <a href="qdatetime.html">QDateTime</a>&#160;<i>min</i>, <a href="qdatetime.html">QDateTime</a>&#160;<i>max</i>)</h3><p>Convenience function to set minimum and maximum date time with
one function call.</p>
<pre class="cpp">
 setDateTimeRange(min<span class="operator">,</span> max);
</pre>
<p>is analogous to:</p>
<pre class="cpp">
 <a href="qdatetimeedit.html#minimumDateTime-prop">setMinimumDateTime</a>(min);
 <a href="qdatetimeedit.html#maximumDateTime-prop">setMaximumDateTime</a>(max);
</pre>
<p>If either <i>min</i> or <i>max</i> are not valid, this function
does nothing.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(),
<a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>(),
<a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(),
<a href="qdatetimeedit.html#minimumDate-prop">clearMinimumDate</a>(),
<a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(),
<a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>(),
<a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>(),
<a href="qdatetimeedit.html#minimumTime-prop">clearMinimumTime</a>(), and
<a href="qdatetime.html#isValid">QDateTime.isValid</a>().</p>


<h3 class="fn"><a name="setDisplayFormat" />QDateTimeEdit.setDisplayFormat (<i>self</i>, QString&#160;<i>format</i>)</h3><h3 class="fn"><a name="setMaximumDate" />QDateTimeEdit.setMaximumDate (<i>self</i>, <a href="qdate.html">QDate</a>&#160;<i>max</i>)</h3><h3 class="fn"><a name="setMaximumDateTime" />QDateTimeEdit.setMaximumDateTime (<i>self</i>, <a href="qdatetime.html">QDateTime</a>&#160;<i>dt</i>)</h3><h3 class="fn"><a name="setMaximumTime" />QDateTimeEdit.setMaximumTime (<i>self</i>, <a href="qtime.html">QTime</a>&#160;<i>max</i>)</h3><h3 class="fn"><a name="setMinimumDate" />QDateTimeEdit.setMinimumDate (<i>self</i>, <a href="qdate.html">QDate</a>&#160;<i>min</i>)</h3><h3 class="fn"><a name="setMinimumDateTime" />QDateTimeEdit.setMinimumDateTime (<i>self</i>, <a href="qdatetime.html">QDateTime</a>&#160;<i>dt</i>)</h3><h3 class="fn"><a name="setMinimumTime" />QDateTimeEdit.setMinimumTime (<i>self</i>, <a href="qtime.html">QTime</a>&#160;<i>min</i>)</h3><h3 class="fn"><a name="setSelectedSection" />QDateTimeEdit.setSelectedSection (<i>self</i>, <a href="qdatetimeedit.html#Section-enum">Section</a>&#160;<i>section</i>)</h3><p>Selects <i>section</i>. If <i>section</i> doesn't exist in the
currently displayed sections this function does nothing. If
<i>section</i> is <a href="qdatetimeedit.html#Section-enum">NoSection</a> this function will
unselect all text in the editor. Otherwise this function will move
the cursor and the current section to the selected section.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#currentSection-prop">currentSection</a>().</p>


<h3 class="fn"><a name="setTime" />QDateTimeEdit.setTime (<i>self</i>, <a href="qtime.html">QTime</a>&#160;<i>time</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setTime(const QTime&amp;)</tt>.</p><h3 class="fn"><a name="setTimeRange" />QDateTimeEdit.setTimeRange (<i>self</i>, <a href="qtime.html">QTime</a>&#160;<i>min</i>, <a href="qtime.html">QTime</a>&#160;<i>max</i>)</h3><p>Convenience function to set minimum and maximum time with one
function call.</p>
<pre class="cpp">
 setTimeRange(min<span class="operator">,</span> max);
</pre>
<p>is analogous to:</p>
<pre class="cpp">
 <a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(min);
 <a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>(max);
</pre>
<p>If either <i>min</i> or <i>max</i> are not valid, this function
does nothing.</p>
<p><b>See also</b> <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(),
<a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>(),
<a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(),
<a href="qdatetimeedit.html#minimumDate-prop">clearMinimumDate</a>(),
<a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(),
<a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>(),
<a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>(),
<a href="qdatetimeedit.html#minimumTime-prop">clearMinimumTime</a>(), and
<a href="qtime.html#isValid">QTime.isValid</a>().</p>


<h3 class="fn"><a name="setTimeSpec" />QDateTimeEdit.setTimeSpec (<i>self</i>, <a href="qt.html#TimeSpec-enum">Qt.TimeSpec</a>&#160;<i>spec</i>)</h3><h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QDateTimeEdit.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p>


<h3 class="fn"><a name="stepBy" />QDateTimeEdit.stepBy (<i>self</i>, int&#160;<i>steps</i>)</h3><p>Reimplemented from <a href="qabstractspinbox.html#stepBy">QAbstractSpinBox.stepBy</a>().</p>


<h3 class="fn"><a name="stepEnabled" /><a href="qabstractspinbox-stepenabled.html">QAbstractSpinBox.StepEnabled</a> QDateTimeEdit.stepEnabled (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractspinbox.html#stepEnabled">QAbstractSpinBox.stepEnabled</a>().</p>


<h3 class="fn"><a name="textFromDateTime" />QString QDateTimeEdit.textFromDateTime (<i>self</i>, <a href="qdatetime.html">QDateTime</a>&#160;<i>dt</i>)</h3><p>This virtual function is used by the date time edit whenever it
needs to display <i>dateTime</i>.</p>
<p>If you reimplement this, you may also need to reimplement
<a href="qdatetimeedit.html#validate">validate</a>().</p>
<p><b>See also</b> <a href="qdatetimeedit.html#dateTimeFromText">dateTimeFromText</a>() and
<a href="qdatetimeedit.html#validate">validate</a>().</p>


<h3 class="fn"><a name="time" /><a href="qtime.html">QTime</a> QDateTimeEdit.time (<i>self</i>)</h3><h3 class="fn"><a name="timeSpec" /><a href="qt.html#TimeSpec-enum">Qt.TimeSpec</a> QDateTimeEdit.timeSpec (<i>self</i>)</h3><h3 class="fn"><a name="validate" />(<a href="qvalidator.html#State-enum">QValidator.State</a>, QString&#160;<i>input</i>, int&#160;<i>pos</i>) QDateTimeEdit.validate (<i>self</i>, QString&#160;<i>input</i>, int&#160;<i>pos</i>)</h3><p>Reimplemented from <a href="qabstractspinbox.html#validate">QAbstractSpinBox.validate</a>().</p>


<h3 class="fn"><a name="validate-2" />(<a href="qvalidator.html#State-enum">QValidator.State</a>, int&#160;<i>pos</i>) QDateTimeEdit.validate (<i>self</i>, QString&#160;<i>input</i>, int&#160;<i>pos</i>)</h3><h3 class="fn"><a name="wheelEvent" />QDateTimeEdit.wheelEvent (<i>self</i>, <a href="qwheelevent.html">QWheelEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#wheelEvent">QWidget.wheelEvent</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="dateChanged" />void dateChanged (const QDate&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the date is changed. The new
date is passed in <i>date</i>.</p>


<h3 class="fn"><a name="dateTimeChanged" />void dateTimeChanged (const QDateTime&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the date or time is changed. The
new date and time is passed in <i>datetime</i>.</p>


<h3 class="fn"><a name="timeChanged" />void timeChanged (const QTime&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the time is changed. The new
time is passed in <i>time</i>.</p>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>